home *** CD-ROM | disk | FTP | other *** search
- /* fxPAINT-API defines
- ©1999 by Felix Schwarz / Innovative
- All rights reserved.
- */
-
- #ifndef _fxpaint_api_h
- #define _fxpaint_api_h 1
-
- #include <fxpaint/fxPLUGIN.h>
-
- #define get_activewin() fxpaint_api(FX_METHOD_GET, FX_ACTIVE_WIN, 0, 0, 0,0)
- #define get_win_existance(win) ((BOOL) fxpaint_api(FX_METHOD_GET, FX_WIN_EXISTANCE, win, 0, 0,0))
- #define get_win_numberoflayers(win) fxpaint_api(FX_METHOD_GET, FX_WIN_NUMBEROFLAYERS, win, 0, 0,0)
- #define get_win_layerdataptr(win,layer) ((struct fsbitmap *) fxpaint_api(FX_METHOD_GET, FX_WIN_LAYER, win, layer, 0, 0))
- #define get_win_fgimage(win,layer) ((struct fsbitmap *) fxpaint_api(FX_METHOD_GET, FX_WIN_FG_IMAGE, win, layer, 0, 0))
- #define get_win_bgimage(win,layer) ((struct fsbitmap *) fxpaint_api(FX_METHOD_GET, FX_WIN_BG_IMAGE, win, layer, 0, 0))
- #define get_win_filename(win) ((UBYTE *) fxpaint_api(FX_METHOD_GET, FX_WIN_FILENAME, win, 0, 0, 0))
-
- #define gui_zoom_plus(win) fxpaint_api(FX_METHOD_PERFORM, FX_WIN_ZOOM_PLUS, win, 0,0,0)
- #define gui_zoom_minus(win) fxpaint_api(FX_METHOD_PERFORM, FX_WIN_ZOOM_MINUS, win, 0,0,0)
- #define gui_zoom_value(win) fxpaint_api(FX_METHOD_PERFORM, FX_WIN_GETZOOM, win, 0,0,0)
-
- #define gui_get_slider(id,gad) fxpaint_api(FX_METHOD_GET, FX_GUI_SLIDER, id, gad, 0, 0)
- #define gui_get_checkbox(id,gad) fxpaint_api(FX_METHOD_GET, FX_GUI_CHECKBOX, id, gad, 0, 0)
- #define gui_set_slider(id,gad,val) fxpaint_api(FX_METHOD_SET, FX_GUI_SLIDER, id, gad, val, 0)
- #define gui_set_checkbox(id,gad,val) fxpaint_api(FX_METHOD_SET, FX_GUI_CHECKBOX, id, gad, val, 0)
-
- #define get_myfxwinid() fxpaint_api(FX_METHOD_GET, FX_GUI_MY_FX_WIN_ID,0,0,0,0)
- #define get_gui_screen() ((struct Screen *) fxpaint_api(FX_METHOD_GET, FX_GUI_SCREEN,0,0,0,0))
- #define get_gui_drawinfo() ((struct DrawInfo *) fxpaint_api(FX_METHOD_GET, FX_GUI_DRAWINFO,0,0,0,0))
- #define get_gui_visualinfo() ((APTR) fxpaint_api(FX_METHOD_GET, FX_GUI_VISUALINFO,0,0,0,0))
- #define get_gui_buttonclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_BUTTON_CLASS_PTR, 0, 0, 0, 0))
- #define get_gui_imageclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_IMAGE_CLASS_PTR, 0, 0, 0, 0))
- #define get_gui_sliderclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_SLIDER_CLASS_PTR, 0, 0, 0, 0))
- #define get_gui_checkboxclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_CHECKBOX_CLASS_PTR, 0, 0, 0, 0))
- #define get_gui_gaugeclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_GAUGE_CLASS_PTR, 0, 0, 0, 0))
- #define get_gui_cycleclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_CYCLE_CLASS_PTR, 0, 0, 0, 0))
- #define get_gui_popupclass() ((Class *) fxpaint_api(FX_METHOD_GET, FX_GUI_POPUP_CLASS_PTR, 0, 0, 0, 0))
-
- #define get_ghei() fxpaint_api(FX_METHOD_GET, FX_GUI_GHEI, 0, 0, 0, 0)
-
- #define addport_sigmask(sigmask,pluginid) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_ADDPORT, sigmask, pluginid,0,0)
- #define remport_sigmask(sigmask,pluginid) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_REMPORT, sigmask, pluginid,0,0)
-
- #define fxp_loadpic(pic) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_LOADPIC, (ULONG) pic, 0, 0, 0))
- #define fx_recalc() fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_FXRECALC, 0,0,0,0)
- #define gui_closenfree(win) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_GUI_CLOSENFREE, win,0,0,0)
- #define fx_find_str_in_buf(buf,buflen,fndstr) ((BOOL) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_FIND_STR_IN_BUF, (ULONG) buf, (ULONG) buflen, (ULONG) fndstr,0))
- #define fs_allocbitmap(width,height,type) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_FSALLOCBITMAP, (ULONG) width, (ULONG) height, (ULONG) type,0))
- #define fs_freebitmap(fsbit) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_FSFREEBITMAP, (ULONG) fsbit, 0, 0, 0)
- #define CstAllocVec(size, flags) ((APTR) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_CSTALLOCVEC, (ULONG) size, (ULONG) flags, 0, 0))
- #define CstFreeVec(mem) fxpaint_api(FX_METHOD_PERFORM, FX_PLUGIN_CSTFREEVEC, (ULONG) mem, 0, 0, 0)
-
- #define fs_floyd_dither(source,palette) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM,FX_FSLIB_DITHERTO256,(ULONG) source, (ULONG) palette,0,0))
- #define fs_ordered_dither(source,palette) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM,FX_FSLIB_DITHERTO256FAST,(ULONG) source, (ULONG) palette,0,0))
- #define fs_scalecopybitmap(source,newwid,newhei) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM,FX_FSLIB_SCALECOPY ,(ULONG) source, newwid, newhei,0))
- #define fs_clonebitmap(source) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM,FX_FSLIB_CLONEBITMAP,(ULONG) source, 0, 0, 0))
-
- #define fx_merge(win,rect) ((struct fsbitmap *) fxpaint_api(FX_METHOD_PERFORM, FX_WIN_MERGE, win, (ULONG) rect, 0, 0))
-
- #define asl_filereq(file,title) ((UBYTE *) fxpaint_api(FX_METHOD_PERFORM, FX_ASL_FILEREQUESTER, (ULONG) file, (ULONG) title, 0,0))
-
- #define dbg_msg(msg) fxpaint_api(FX_METHOD_PERFORM, FX_DEBUG_WRITETEXT, msg, 0, 0, 0)
- #define dbg_num(msg,num) fxpaint_api(FX_METHOD_PERFORM, FX_DEBUG_WRITETEXTNUMBER, msg, num, 0, 0)
-
- #define GAD_DISTX ((long) fxpaint_api(FX_METHOD_GET, FX_GUI_DISTX, 0,0,0,0))
- #define GAD_DISTY ((long) fxpaint_api(FX_METHOD_GET, FX_GUI_DISTY, 0,0,0,0))
-
- struct fsbitmap
- {
- APTR location;
- LONG width; // The width of the bitmap
- LONG height; // The height of the bitmap
- LONG type; // Type of the bitmap (either 1 for Chunky or 3 for RGB)
- };
-
- typedef struct tagFX_GUI
- {
- struct Gadget *glist;
- struct Gadget *gads[100];
- struct Window *win;
- long min_iw;
- long min_ih;
- long min_ixp; /* Minimale X-Verschiebung in einem Fenster */
- long min_iyp; /* Y*/
- }FXGUI;
-
- /* Defines for the fxPAINT-GUI-engine*/
- #define GUI_BUTTON 1L
- #define GUI_STRING 2L
- #define GUI_CYCLE 3L
- #define GUI_SLIDER 4L
- #define GUI_ONEBUTTONBAR 5L
- #define GUI_CANCELBAR 6L
- #define GUI_VERTSPACE 7L
- #define GUI_CHECKBOX 8L
- #define GUI_SIZEPAIR 9L
- #define GUI_INTEGER 10L
- #define GUI_SELWIND 11L
- #define GUI_LISTVIEW 12L
- #define GUI_GAMMASLIDER 13L
- #define GUI_RLISTVIEW 14L
- #define GUI_TEXT 15L
- #define GUI_POPUP 16L
- #define GUI_PLACETXTD 17L
- #define GUI_RGBSLIDER 18L
-
- #define GUI_CHECKON 1L
- #define GUI_CHECKOFF 0L
-
- #define GUI_RGT PLACETEXT_RIGHT
-
- #define BORDER_RIGHT 18L
- #define BORDER_BOTTOM 10L
- #define HLINER_DIST 2L
-
- #define STD_SIZE_IDCMP IDCMP_CLOSEWINDOW|IDCMP_MENUPICK|IDCMP_MOUSEBUTTONS|IDCMP_ACTIVEWINDOW|IDCMP_GADGETUP|IDCMP_NEWSIZE|IDCMP_GADGETHELP|IDCMP_IDCMPUPDATE
- #define STD_SIZESLIDE_IDCMP IDCMP_CLOSEWINDOW|IDCMP_MENUPICK|IDCMP_MOUSEBUTTONS|IDCMP_ACTIVEWINDOW|IDCMP_GADGETUP|IDCMP_NEWSIZE|SLIDERIDCMP|IDCMP_GADGETHELP|IDCMP_IDCMPUPDATE
- #define STD_SIZESLIDETICK_IDCMP IDCMP_CLOSEWINDOW|IDCMP_MENUPICK|IDCMP_MOUSEBUTTONS|IDCMP_ACTIVEWINDOW|IDCMP_GADGETUP|IDCMP_NEWSIZE|SLIDERIDCMP|IDCMP_INTUITICKS|IDCMP_GADGETHELP|IDCMP_IDCMPUPDATE
- #define STD_SIZESLIDELIST_IDCMP IDCMP_CLOSEWINDOW|IDCMP_MENUPICK|IDCMP_MOUSEBUTTONS|IDCMP_ACTIVEWINDOW|IDCMP_GADGETUP|IDCMP_NEWSIZE|SLIDERIDCMP|LISTVIEWIDCMP|IDCMP_GADGETHELP|IDCMP_IDCMPUPDATE
-
- #define DRAW_UNSEL 0L
- #define DRAW_SEL 1L
-
- #define FLEX_NEXT 100
- #define FLEX_LAST 0
-
- #define GADGETID(x) (((struct Gadget *)(x->IAddress))->GadgetID)
-
- #endif
-